<?php

namespace Xin\ThinkPHP\Foundation\Middleware;

use think\Request;

/**
 * @property array $except
 */
trait InteractsExcept
{

    /**
     * @param \Xin\ThinkPHP\Http\Requestable $request
     * @return bool
     */
    protected function isExcept(Request $request)
    {
        $except = property_exists($this, 'except') ? $this->except : [];

        return $request->pathIs($except);
    }

}
